home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tegl6b.zip / INTROPAK.EXE / lha / ANIMUNIT.DOC < prev    next >
Text File  |  1991-08-16  |  2KB  |  70 lines

  1. {-----------------------------------------------------------------------------}
  2. {               TEGL Windows ToolKit II                  }
  3. {          Copyright (C) 1990, 1991 TEGL Systems Corporation              }
  4. {                All Rights Reserved.                  }
  5. {-----------------------------------------------------------------------------}
  6. { This unit is an identical version of ANIMATE without using Objects }
  7. {$I switches.inc}
  8.  
  9. Unit Animunit;
  10.  
  11. INTERFACE
  12.  
  13. USES Crt,            {sound, nosound}
  14.      TGraph,
  15.      teglmain,            {beepstatus}
  16.      Virtmem,
  17.      FastGrph,            {flip pages}
  18.      IPStacks,
  19.      TEGLUnit;            {windows stacked images}
  20.  
  21.  
  22. TYPE
  23.    coordinates = record
  24.             x,y : Integer;
  25.          end;
  26.  
  27.    AFramePtr = ^AnimateFrame;
  28.    AnimateFrame = record
  29.     nextframe   : AFramePtr;    {next pointer, can be circular buffer}
  30.     imagepic    : Pointer;        {image for display}
  31.     tonehz        : Word;        {0 turns off tone}
  32.     tonedelay   : Word;
  33.     movement    : coordinates;    {next increment}
  34.     imgdelay    : Word;        {delay before next image is placed}
  35.     imagesz     : Word;        {size of image}
  36.     height,width: Word;        {length and width of image}
  37.     Color        : Word;        {color for putpict}
  38.    END;
  39.  
  40.    sequenceptr = ^sequenceset;
  41.    sequenceset = record
  42.     nextsequence  : sequenceptr;
  43.     sequencenum   : Word;
  44.     sequenceframe : AFramePtr;
  45.    END;
  46.  
  47.    AnimateObject = record
  48.     currentframe  : AFramePtr;    {pointer to current picture frame}
  49.     firstframe    : AFramePtr;    {first image pointer}
  50.     sequenceframe : sequenceptr;
  51.     FrameNumber   : Word;
  52.     cc          : coordinates;
  53.    END;
  54.  
  55.  
  56. Procedure Init(var AO:AnimateObject);
  57. Procedure Origin(var AO:AnimateObject; ox,oy:Word);
  58. Procedure GetOrigin(var AO:AnimateObject; VAR lastox,lastoy:Integer);
  59. Procedure ResetFrame(var AO:AnimateObject; startframe : Word);
  60. Function  CurrentFrameNumber(VAR AO:AnimateObject) : Word;
  61. Function  Destination(VAR AO:AnimateObject; dx,dy : Word) : Word;
  62. Procedure AddFrame(VAR AO:AnimateObject; pp:Pointer; mx,my:Integer; ht,wd,dy,hz,hzdy,co:Word);
  63. Procedure Sequence(var AO:AnimateObject; seqnum:Word);
  64. Procedure ResetSequence(var AO:AnimateObject);
  65. Procedure AnimateInit;
  66. Procedure Animate(var AO:AnimateObject; numframe : Word);
  67. Procedure AnimateComplete(var AO:AnimateObject);
  68.  
  69. IMPLEMENTATION
  70.